import request from '@/router/axios';
import config from '@/config/website'

//类别数据
export const getTypeList = (data) => {
    return request({
        url: '/api/hg-public/customer/selectSupplyMaterial',
        method: 'get',
    })
}
//列表
export const customerProfileList = (current, size, equipment) => {
    return request({
        url: '/api/hg-public/customer/page',
        method: 'get',
        params: {
            current,
            size,
            ...equipment
        }
    })
}


//新建
export const customerProfileAdd = (data) => {
    return request({
        url: '/api/hg-public/customer/save',
        method: 'post',
        data
    })
}
//修改
export const customerProfileUpdate = (data) => {
    return request({
        url: '/api/hg-public/customer/update',
        method: 'post',
        data
    })
}
//查看
export const customerProfileView = (id) => {
    return request({
        url: '/api/hg-public/customer/detail',
        method: 'get',
        params: {
            id
        }
    })
}

//删除
export const customerProfileDel = (ids) => {
    return request({
        url: '/api/hg-public/customer/remove',
        method: 'post',
        params: {
            ids
        }
    })
}

//获取销售工程师
export const getEngineers = () => {
    return request({
        url: '/api/blade-system/personnelinfo/selectEngineers',
        method: 'get',
    })
}
//提交
export const customerProfileSubmit = (id) => {
    return request({
        url: '/api/hg-public/customer/start-process',
        method: 'post',
        params: {
            id,
        }
    })
}

export const saveChangeInfo = (data) => {
    return request({
        url: 'api/hg-public/customerchange/save',
        method: 'post',
        data
    })
}
//列表
export const getChangeHistoryList = (current, size,customerId) => {
    return request({
        url: 'api/hg-public/customerchange/page',
        method: 'get',
        params: {
            current,
            size,
            customerId
        }
    })
}
export const getChangeDetail = (id) => {
    return request({
        url: '/api/hg-public/customerchange/detail',
        method: 'get',
        params: {
            id
        }
    })
}
//提交历史
export const historySubmit = (id) => {
    return request({
        url: '/api/hg-public/customerchange/start-process',
        method: 'post',
        params: {
            id,
        }
    })
}


//删除
export const historyDel = (ids) => {
  return request({
    url: '/api/hg-public/customerchange/remove',
    method: 'post',
    params: {
      ids
    }
  })
}
//获取所属商务主体
export const getBusinessSubjectIdList = () => {
    return request({
        url: '/api/hg-public/customer/getBusiness',
        method: 'get',
    })
}